import java.util.Date;
import java.util.List;

import org.upfrost.AbstractDAO;
import org.upfrost.MapperSession;


public class TestDAO extends AbstractDAO<Test> 
{
	static public String CREATE_HSQL = "CREATE TABLE test (name CHAR(64) PRIMARY KEY, email VARCHAR(128), creationdate DATETIME)";
	
	public TestDAO(MapperSession session) {
		super(session);
	}

	public List<Test> getAll()
	{
		return createQuery("select * from test").list();
	}

	public List<Test> getSince(Date since)
	{
		return createQuery("select * from test where creationdate>?").param(since).list();
	}
}
